<%--
  Created by IntelliJ IDEA.
  User: 71716
  Date: 2020/8/31
  Time: 21:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script>
    /*单个数据传递*/
    $.ajax({
        type: 'post',
        url: 'ajax/test2',
        data:'{"username":"admin","age":"18"}',
        success:function (data) {
            alert("ok"+data)
        },
        error:function () {
            alert("error")

        }
    });
</script>
</html>
